<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>文献资源管理系统-套信息维护模板</title>
<link rel="icon" href="favicon.ico" type="image/ico">
<meta name="keywords" content="文献资源管理系统-套信息维护模板">
<meta name="description" content="文献资源管理系统-套信息维护模板">
<meta name="author" content="yinqi">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/materialdesignicons.min.css" rel="stylesheet">
<link href="css/style.min.css" rel="stylesheet">
</head>
  <style>
    .col-lg-12{
      margin: auto;
    top: 17px;
    left: 0;
    bottom: 0;
    right: 0;
    position: absolute;
    }
  </style>
<body>
<div class="lyear-layout-web" id="app">
  <div class="lyear-layout-container">
    <!--左侧导航-->

    <!--End 左侧导航-->
    
    <!--头部信息-->
 
    <!--End 头部信息-->
    
    <!--页面主要内容-->

    <main class="lyear-layout-content" >
      <div class="container-fluid">
        
        <div class="row">
          <div class="col-lg-12" >
            <div class="card">
              <div class="card-toolbar clearfix">
                <form class="pull-right search-bar" method="get" action="#!" role="form">
                  <div class="input-group" style="margin-left: -58px;">
                    <div class="input-group-btn">
                      <input type="hidden" name="search_field" id="search-field" value="title">
                      <button class="btn btn-default dropdown-toggle" id="search-btn" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">
                        套名称 <span class="caret"></span>
                      </button>
                    </div>
                    <input type="text" class="form-control" v-model="covername.coverName"  placeholder="请输入套名称">
                    <div class="input-group-btn">
                      <input type="hidden" name="search_field" id="search-field" value="title">
                      <!-- <el-button @click="getlist(1)">默认按钮</el-button> -->
                      <button class="btn btn-default dropdown-toggle" id="search-btn" @click="getlist(1)"  data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">
                        搜索按钮
                      </button>
                    </div>
                  </div>
                </form>
               
                <form class="pull-right search-bar" method="get" action="#!" role="form">
                  <div class="input-group" style="margin-left: -45px;
                  margin-right: 58px;">
                    <div class="input-group-btn">
                      <input type="hidden" name="search_field" id="search-field" value="title">
                      <button class="btn btn-default dropdown-toggle" id="search-btn" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">
                        出版社 <span class="caret"></span>
                      </button>
                    </div>
                    <input type="text" class="form-control" v-model="covername.publishname"   placeholder="请输入出版社">
                   
                  </div>
                </form>
                <div class="toolbar-btn-action">
                  <a class="btn btn-primary m-r-5" data-toggle="modal" @click="click()"  data-target="#myModal"><i class="mdi mdi-plus"></i> 新增</a>
                  <el-button  class="btn btn-primary m-r-5" type="warning"  @click="audit(sels)" :disabled="this.sels.length === 0||this.disabled"><i class="mdi mdi-check"></i> 提交审核</el-button>
                  <el-button  class="btn btn-danger" type="warning" style="background-color:#f96868;" @click="removeBatch(sels)" :disabled="this.sels.length === 0||this.disabled"><i class="mdi mdi-window-close"></i>批量删除</el-button>
                </div>
              </div>
              <div class="card-body">
                <div class="table-responsive" >
                  <table class="table table-bordered">
                    <template>
                      <el-table
                        v-loading="loading"
                        element-loading-text="拼命加载中"
                        :data="list"
                        style="width: 100%"  @selection-change="selsChange">
                    <el-table-column type="selection" width="65" :selectable='checkboxT' ></el-table-column>
                        <el-table-column
                          prop="id"
                          label="序号"
                          width="180">
                        </el-table-column>
                        <el-table-column
                          prop="coverName"
                          label="套名称"
                          width="180">
                          <template slot-scope="scope">
                            <a  type="button" @click="unit(scope.row.id)"   data-toggle="modal" data-target="#myModaldisabled">{{scope.row.coverName}}</a>
                         </template>
                        </el-table-column>
                        <el-table-column
                          prop="coverNumber"
                          label="套订单">
                        </el-table-column>
                        <el-table-column
                          prop="plssn"
                          label="ISSN">
                          <template slot-scope="scope">
                            <span>{{scope.row.plssn}}/{{scope.row.eissn}}</span>
                         </template>
                        </el-table-column>
                        <el-table-column
                          prop="pisbn"
                          label="ISBN">
                          <template slot-scope="scope">
                            <span>{{scope.row.pisbn}}/{{scope.row.elsbn}}</span>
                         </template>
                        </el-table-column>
                        <el-table-column
                        prop="literature"
                        label="类型">
                      </el-table-column>
                      <el-table-column
                      prop="country"
                      label="出版国">
                    </el-table-column>
                      <el-table-column
                      prop="publishname"
                      label="出版社">
                    </el-table-column>
                    <el-table-column
                    prop="organ"
                    label="成员单位">
                  </el-table-column>
                    <el-table-column
                    prop="subject"
                    label="学科">
                  </el-table-column>
                  <el-table-column
                  prop="cmorphology"
                  label="载体">
                </el-table-column>
                  </el-table-column>
                  <el-table-column
                  prop="language"
                  label="语种">
                </el-table-column>
                <el-table-column
                prop="reviewType"
                label="状态">
                <template slot-scope="scope">
                  <span>{{config.gzdStateList[scope.row.reviewType]}}</span>
               </template>
              </el-table-column>
                  <el-table-column label="操作" align="center" min-width="100">
              　　　　<template slot-scope="scope">
                          <div class="btn-group">
                            <a class="btn btn-xs btn-default" @click="unit(scope.row.id)"  type="button" data-toggle="modal" data-target="#myModalup" title="编辑" data-toggle="tooltip"><i class="mdi mdi-pencil"></i></a>
                          </div>
            
              　　　　</template>
              　　</el-table-column>
                      </el-table>
                    </template>
                  </table>
                </div>

                <nav>
                  <ul class="pagination pagination-circle">
                    <li class="active"><a>{{totals}}</a></li>
                    <li>
                      <a type="button" @click="getlist(prePage)">
                        <span><i class="mdi mdi-chevron-left" ></i></span>
                      </a>
                    </li>
                    <li ><a>{{currentPage}}</a></li>
                    <li>
                      <a type="button" @click="getlist(nextPage)">
                        <span><i class="mdi mdi-chevron-right"></i></span>
                      </a>
                    </li>
                  </ul>
                </nav>  
 <!-- 添加模态框（Modal） -->
 <form action=""  class="form-horizontal" role="form">
  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog" style="height: 90%;">
          <div class="modal-content" style="margin-top: -21px;">
              <div class="modal-header">
                  <h4 class="modal-title" id="myModalLabel">
                      新增套信息
                  </h4>
                  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                      &times;
                  </button>
              </div>
              <div class="modal-body" style="height: 100%;">
                <div class="form-group">
                  <label for="lastname" class="col-sm-3 control-label">套名称</label>
                  <div class="col-sm-7">
                    <input class="form-control" type="text" v-model="cover.coverName" placeholder="套名称">
                  </div>
                   </div>
                   <div class="form-group">
                    <label for="lastname" class="col-sm-3 control-label">套订单</label>
                    <div class="col-sm-7">
                      <input class="form-control" type="text" v-model="cover.coverNumber" placeholder="套订单">
                    </div>
                     </div>
                     <div class="form-group">
                      <label for="lastname" class="col-sm-3 control-label">PISSN</label>
                      <div class="col-sm-7">
                        <input class="form-control" type="text" v-model="cover.plssn" placeholder="PISSN">
                      </div>
                       </div>
                       <div class="form-group">
                        <label for="lastname" class="col-sm-3 control-label">PISBN</label>
                        <div class="col-sm-7">
                          <input class="form-control" type="text" v-model="cover.pisbn" placeholder="PISBN">
                        </div>
                         </div>
                         <div class="form-group">
                          <label for="lastname" class="col-sm-3 control-label">EISSN</label>
                          <div class="col-sm-7">
                            <input class="form-control" type="text" v-model="cover.eissn" placeholder="EISSN">
                          </div>
                           </div> 
                           <div class="form-group">
                            <label for="lastname" class="col-sm-3 control-label">EISBN</label>
                            <div class="col-sm-7">
                              <input class="form-control" type="text" v-model="cover.elsbn" placeholder="EISBN">
                            </div>
                             </div>
                             <div class="form-group">
                              <label for="lastname" class="col-sm-3 control-label">类型</label>
                              <div class="col-sm-7">
                                <select v-model="cover.literatureTypeId" class="form-control">
                                  <option v-for="(item,index) in literature" :value="item.id">{{item.name}}</option>
                                </select>
                              </div>
                               </div>
                         <div class="form-group">
                          <label for="lastname" class="col-sm-3 control-label">出版国</label>
                          <div class="col-sm-7">
                            <select v-model="cover.countryId" class="form-control">
                              <option v-for="(item,index) in country" :value="item.id">{{item.name}}</option>
                            </select>
                          </div>
                           </div>
                           <div class="form-group">
                            <label for="lastname" class="col-sm-3 control-label">出版社</label>
                            <div class="col-sm-7">
                              <input class="form-control" type="text" v-model="cover.publishname" placeholder="出版社">
                            </div>
                             </div>
                             <div class="form-group">
                              <label for="lastname" class="col-sm-3 control-label">成员单位</label>
                              <div class="col-sm-7">
                                <select v-model="order.organId" class="form-control">
                                  <option v-for="(item,index) in organ" :value="item.id">{{item.name}}</option>
                                </select>
                              </div>
                               </div>
                               <div class="form-group">
                                <label for="lastname" class="col-sm-3 control-label">学科</label>
                                <div class="col-sm-7">
                                  <template>
                                    <el-cascader
                                      style="width: 100%"
                                      v-model="cover.subjectId"
                                      clearable
                                      placeholder="请选择"
                                      ref="cascaderHandle"
                                      :options="data"
                                      filterable
                                      :props="defaultProps"
                                      @focus="focus"
                                      @blur="blur">
                                      <template slot-scope="{ node, data }">
                                        <span>{{ node.label }}</span>
                                        <span></span>
                                      </template>
                                    </el-cascader>
                                  </template>
                                </div>
                                 </div>
                                 <div class="form-group">
                                  <label for="lastname" class="col-sm-3 control-label">载体</label>
                                  <div class="col-sm-7">
                                    <select v-model="cover.cmorphologyId" class="form-control">
                                      <option v-for="(item,index) in cmorphology" :value="item.id">{{item.name}}</option>
                                    </select>
                                  </div>
                                   </div>
                               <div class="form-group">
                                <label for="lastname" class="col-sm-3 control-label">语种</label>
                                <div class="col-sm-7">
                                  <template>
                                    <el-cascader
                                      style="width: 100%"
                                      v-model="cover.languageId"
                                      clearable
                                      placeholder="请选择"
                                      ref="cascaderHandle"
                                      :options="data2"
                                      filterable
                                      :props="defaultProps"
                                      @focus="focus"
                                      @blur="blur">
                                      <template slot-scope="{ node, data }">
                                        <span>{{ node.label }}</span>
                                        <span></span>
                                      </template>
                                    </el-cascader>
                                  </template>
                                </div>
                                 </div>
                                 
              </div>
              <div class="modal-footer">
                  <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                  <el-button id="button" data-dismiss="modal"  class="btn btn-default" type="primary" :loading="loading" @click="coveradd()"  >提交</el-button>

              </div>
          </div>
      </div>
  </div>
</form>
 <!-- 编辑模态框（Modal） -->
 <form action=""  class="form-horizontal" role="form">
  <div class="modal fade" id="myModalup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog" style="height: 90%;">
          <div class="modal-content" style="margin-top: -21px;">
              <div class="modal-header">
                  <h4 class="modal-title" id="myModalLabel">
                      编辑套信息
                  </h4>
                  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                      &times;
                  </button>
              </div>
              <div class="modal-body" style="height: 100%;">
                <div class="form-group">
                  <label for="lastname" class="col-sm-3 control-label">套名称</label>
                  <div class="col-sm-7">
                    <input class="form-control" type="text" v-model="covers.coverName" placeholder="套名称">
                  </div>
                   </div>
                   <div class="form-group">
                    <label for="lastname" class="col-sm-3 control-label">套订单</label>
                    <div class="col-sm-7">
                      <input class="form-control" type="text" v-model="covers.coverNumber" placeholder="套订单">
                    </div>
                     </div>
                     <div class="form-group">
                      <label for="lastname" class="col-sm-3 control-label">PISSN</label>
                      <div class="col-sm-7">
                        <input class="form-control" type="text" v-model="covers.plssn" placeholder="PISSN">
                      </div>
                       </div>
                       <div class="form-group">
                        <label for="lastname" class="col-sm-3 control-label">PISBN</label>
                        <div class="col-sm-7">
                          <input class="form-control" type="text" v-model="covers.pisbn" placeholder="PISBN">
                        </div>
                         </div>
                         <div class="form-group">
                          <label for="lastname" class="col-sm-3 control-label">EISSN</label>
                          <div class="col-sm-7">
                            <input class="form-control" type="text" v-model="covers.eissn" placeholder="EISSN">
                          </div>
                           </div> 
                           <div class="form-group">
                            <label for="lastname" class="col-sm-3 control-label">EISBN</label>
                            <div class="col-sm-7">
                              <input class="form-control" type="text" v-model="covers.elsbn" placeholder="EISBN">
                            </div>
                             </div>
                             <div class="form-group">
                              <label for="lastname" class="col-sm-3 control-label">类型</label>
                              <div class="col-sm-7">
                                <select v-model="covers.literatureTypeId" class="form-control">
                                  <option v-for="(item,index) in literature" :value="item.id">{{item.name}}</option>
                                </select>
                              </div>
                               </div>
                         <div class="form-group">
                          <label for="lastname" class="col-sm-3 control-label">出版国</label>
                          <div class="col-sm-7">
                            <select v-model="covers.countryId" class="form-control">
                              <option v-for="(item,index) in country" :value="item.id">{{item.name}}</option>
                            </select>
                          </div>
                           </div>
                           <div class="form-group">
                            <label for="lastname" class="col-sm-3 control-label">出版社</label>
                            <div class="col-sm-7">
                              <input class="form-control" type="text" v-model="covers.publishname" placeholder="出版社">
                            </div>
                             </div>
                             <div class="form-group">
                              <label for="lastname" class="col-sm-3 control-label">成员单位</label>
                              <div class="col-sm-7">
                                <select v-model="orders.organId" class="form-control" disabled>
                                  <option v-for="(item,index) in organ" :value="item.id" >{{item.name}}</option>
                                </select>
                              </div>
                               </div>
                               <div class="form-group">
                                <label for="lastname" class="col-sm-3 control-label">学科</label>
                                <div class="col-sm-7">
                                  <template>
                                    <el-cascader
                                      style="width: 100%"
                                      v-model="covers.subjectId"
                                      clearable
                                      placeholder="请选择"
                                      ref="cascaderHandle"
                                      :options="data"
                                      filterable
                                      :props="defaultProps"
                                      @focus="focus"
                                      @blur="blur">
                                      <template slot-scope="{ node, data }">
                                        <span >{{ node.label }}</span>
                                        <span></span>
                                      </template>
                                    </el-cascader>
                                  </template>
                                 
                                </div>
                                 </div>
                                 <div class="form-group">
                                  <label for="lastname" class="col-sm-3 control-label">载体</label>
                                  <div class="col-sm-7">
                                    <select v-model="covers.cmorphologyId" class="form-control">
                                      <option v-for="(item,index) in cmorphology" :value="item.id">{{item.name}}</option>
                                    </select>
                                  </div>
                                   </div>
                               <div class="form-group">
                                <label for="lastname" class="col-sm-3 control-label">语种</label>
                                <div class="col-sm-7">
                                  <template>
                                    <el-cascader
                                      style="width: 100%"
                                      v-model="covers.languageId"
                                      clearable
                                      placeholder="请选择"
                                      ref="cascaderHandle"
                                      :options="data2"
                                      filterable
                                      :props="defaultProps"
                                      @focus="focus"
                                      @blur="blur">
                                      <template slot-scope="{ node, data }">
                                        <span>{{ node.label }}</span>
                                        <span></span>
                                      </template>
                                    </el-cascader>
                                  </template>
                                  
                                </div>
                                 </div>
                                
                                 
              </div>
              <div class="modal-footer">
                  <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                  <el-button id="button" data-dismiss="modal"  class="btn btn-default" type="primary" :loading="loading" @click="coverupdate()"  >提交</el-button>

              </div>
          </div>
      </div>
  </div>
</form>
 <!-- 套详情模态框（Modal） -->
 <form action=""  class="form-horizontal" role="form">
  <div class="modal fade" id="myModaldisabled" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog">
          <div class="modal-content" style="width: 971px;  margin-left: -252px;">
              <div class="modal-header">
                  <h4 class="modal-title" id="myModalLabel">
                    套详情
                  </h4>
                  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                      &times;
                  </button>
              </div>
              <div class="modal-body" style="height: 100%; float: left;">
                <div class="form-group">
                  <label for="lastname" class="col-sm-3 control-label">套名称</label>
                  <div class="col-sm-7">
                    <input class="form-control" type="text" v-model="covers.coverName" disabled placeholder="套名称">
                  </div>
                   </div>
                   <div class="form-group">
                    <label for="lastname" class="col-sm-3 control-label">套订单</label>
                    <div class="col-sm-7">
                      <input class="form-control" type="text" v-model="covers.coverNumber" disabled placeholder="套订单">
                    </div>
                     </div>
                     <div class="form-group">
                      <label for="lastname" class="col-sm-3 control-label">类型</label>
                      <div class="col-sm-7">
                        <select v-model="covers.literatureTypeId" disabled class="form-control">
                          <option v-for="(item,index) in literature" :value="item.id">{{item.name}}</option>
                        </select>
                      </div>
                       </div>
              </div>
              <div class="modal-body" style="height: 100%; float: left;">
                    
                 <div class="form-group">
                  <label for="lastname" class="col-sm-3 control-label">出版国</label>
                  <div class="col-sm-7">
                    <select v-model="covers.countryId" class="form-control" disabled>
                      <option v-for="(item,index) in country" :value="item.id">{{item.name}}</option>
                    </select>
                  </div>
                   </div>
                   <div class="form-group">
                    <label for="lastname" class="col-sm-3 control-label">出版社</label>
                    <div class="col-sm-7">
                      <input class="form-control" type="text" v-model="covers.publishname" disabled placeholder="出版社">
                    </div>
                     </div>
                     <div class="form-group">
                      <label for="lastname" class="col-sm-3 control-label">成员单位</label>
                      <div class="col-sm-7">
                        <select v-model="orders.organId" class="form-control" disabled>
                          <option v-for="(item,index) in organ" :value="item.id">{{item.name}}</option>
                        </select>
                      </div>
                       </div>          
              </div>
              <div class="modal-body" style="height: 100%; float: left;">
               
               
                     <div class="form-group">
                      <label for="lastname" class="col-sm-3 control-label">学科</label>
                      <div class="col-sm-7" >
                        <template >
                          <el-cascader
                            style="width: 100%"
                            v-model="covers.subjectId"
                            clearable
                            :disabled="true"
                            placeholder="请选择"
                            ref="cascaderHandle"
                            :options="data"
                            filterable
                            :props="defaultProps"
                            @focus="focus"
                            @blur="blur">
                            <template slot-scope="{ node, data }">
                              <span >{{ node.label }}</span>
                              <span></span>
                            </template>
                          </el-cascader>
                        </template>
                      
                      </div>
                       </div>
                       <div class="form-group"  style="margin-top: 25px;">
                        <label for="lastname" class="col-sm-3 control-label">载体</label>
                        <div class="col-sm-7">
                          <select v-model="covers.cmorphologyId" class="form-control" disabled>
                            <option v-for="(item,index) in cmorphology" :value="item.id">{{item.name}}</option>
                          </select>
                        </div>
                         </div>
                     <div class="form-group " style="margin-top: 26px;">
                      <label for="lastname" class="col-sm-3 control-label">语种</label>
                      <div class="col-sm-7">
                        <template>
                          <el-cascader
                            style="width: 100%"
                            v-model="covers.languageId"
                            clearable
                            :disabled="true"
                            placeholder="请选择"
                            ref="cascaderHandle"
                            :options="data2"
                            filterable
                            :props="defaultProps"
                            @focus="focus"
                            @blur="blur">
                            <template slot-scope="{ node, data }">
                              <span>{{ node.label }}</span>
                              <span></span>
                            </template>
                          </el-cascader>
                        </template>
                      
                      </div>
                       </div>
               </div>
               <div class="modal-header">
               
                </div>
               
                  <div class="modal-body" style="height: 100%; margin-left: -232px;">
                    <div class="form-group">
                      <label for="lastname" class="col-sm-3 control-label">年度</label>
                      <div class="col-sm-7">
                        <input class="form-control" type="text" v-model="orders.orderYear" disabled placeholder="年度">
                      </div>
                      </div>
                  </div>
                  <div class="modal-body" style="height: 100%; margin-left: 75px;">
                    <template>
                      <el-table
                        :data="ordero"
                        style="width: 100%"  >
                        <el-table-column
                          prop="orderType"
                          label="订购类型"
                          width="180">
                          <template slot-scope="scope">
                            <span>{{config2.gzdStateList[scope.row.orderType]}}</span>
                         </template>
                        </el-table-column>
                        <el-table-column
                          prop="orderCoverNumber"
                          label="订购号">
                        </el-table-column>
                        <el-table-column
                          prop="aogeMoney"
                          label="到货价格">
                        </el-table-column>
                        <el-table-column
                          prop="orderPay"
                          label="支付价格">
                        </el-table-column>
                        <el-table-column
                        prop="contiunedStatus"
                        label="是否续停订">
                        <template slot-scope="scope">
                          <span>{{config3.gzdStateList[scope.row.contiunedStatus]}}</span>
                       </template>
                      </el-table-column>
                      </el-table>
                    </template>

                  </div>
                        <div class="modal-footer">
                          
                        </div>
                    </div>
                </div>
            </div>
          </form>
              </div>
            </div>
          </div>
          
        </div>
        
      </div>
      
    </main>
    <!--End 页面主要内容-->
  </div>
</div>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>

<script src="https://cdn.bootcss.com/vue/2.6.9/vue.min.js"></script>
<script src="https://cdn.bootcss.com/axios/0.19.0/axios.min.js"></script>

<!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script type="text/javascript">
$(function(){
    $('.search-bar .dropdown-menu a').click(function() {
        var field = $(this).data('field') || '';
        $('#search-field').val(field);
        $('#search-btn').html($(this).text() + ' <span class="caret"></span>');
    });
});
</script>
</body>

<script>
  new Vue({
    el:"#app",
    data:{
      config :{
        gzdStateList: {
            0: '待审核',
            1: '审核中',
            2: '审核通过',
            3: '审核未通过',
            },  
    },
    config2 :{
        gzdStateList: {
            1: '新增',
            2: '续订',
            3: '停订',
            },  
    },
    config3 :{
        gzdStateList: {
            1: '是',
            0: '否',
            },  
    },
      list:[],
      loading: false,
      covername:{},
      currentPage:1, //当前页码
      size:5, 
      totals:"",
      prePage:1,
      nextPage:1,
      totalPage:1, //总页数

      sels: [],//选中显示的值
      selsadd: [],//选中显示的值
      selsup: [],//选中显示的值

      cover:{},
      covers:{
        languageId:"",
        subjectId:""
      },
      orders:{},
      order:{
        orderPay:"0.0",
        aogeMoney:"0.0"
      },
      language:{},  //语种
      cmorphology:{},//载体
      subject:{},//学科
      organ:{},//单位
      country:{},//国家
      literature:{},//文献
      orderr:{},
      ordero:[],
      params:{},
      aa:[],
      bb:[],
      coversub:{},
      coversubup:{},
      data: [],
      data2:[],
      defaultProps: {
        multiple: true,
        checkStrictly: true,
        expandTrigger: 'hover',
          value:'id',        // ID字段名
          label: 'name',      //name字段名
          children: 'children'    //子级字段名
      }
    },
    created () {
        this.getlist(1);
        this.subjectId();
    },
    methods: {
      subjectId(){
        axios.get("http://127.0.0.1:8090/findparamsubjectXl").then(res => {

        this.arraytotree(res.data);

        }).catch(res => {

        })
        axios.get("http://127.0.0.1:8090/findparamlanguageXl").then(res => {

        this.arraytotree2(res.data);

        }).catch(res => {

        })
      },
      getlist(currentPage){
      this.loading=true;
      setTimeout(() => {
      this.loading = false;

      axios.post("http://29n01o8660.oicp.vip/server/findcoverVolikename/"+this.currentPage+"/"+this.size,this.covername)
      .then(res => {
        this.list = res.data.data.rows;
        this.totals = res.data.data.total;
        this.currentPage = currentPage;
        this.totalPage = Math.ceil(this.totals/this.size);
        this.prePage = 
        currentPage>1?currentPage-1:currentPage;
        this.nextPage = currentPage<this.totalPage?currentPage+1:currentPage;
        console.log(res)
      })
      .catch(err => {
        console.error(err); 
      })

       }, 2000);

       axios.get("http://29n01o8660.oicp.vip/server/findbyorder")
       .then(res => {
         this.orderr = res.data
        //  alert(JSON.stringify(this.order))
         console.log(res)
       })
       .catch(err => {
         console.error(err); 
       })
       axios.get("http://29n01o8660.oicp.vip/server/findparamliterature")
       .then(res => {
         this.literature = res.data
         console.log(res)
       })
       .catch(err => {
         console.error(err); 
       })
       axios.get("http://29n01o8660.oicp.vip/server/findparamcountry")
       .then(res => {
         this.country = res.data
         console.log(res)
       })
       .catch(err => {
         console.error(err); 
       })
       axios.get("http://29n01o8660.oicp.vip/server/findorgantree")
       .then(res => {
         this.organ = res.data
         console.log(res)
       })
       .catch(err => {
         console.error(err); 
       })
       axios.get("http://29n01o8660.oicp.vip/server/findparamsubject")
       .then(res => {
         this.subject = res.data
         console.log(res)
       })
       .catch(err => {
         console.error(err); 
       })
       axios.get("http://29n01o8660.oicp.vip/server/findparamcmorphology")
       .then(res => {
         this.cmorphology = res.data
         console.log(res)
       })
       .catch(err => {
         console.error(err); 
       })
       axios.get("http://29n01o8660.oicp.vip/server/findparamlanguage")
       .then(res => {
         this.language = res.data
         console.log(res)
       })
       .catch(err => {
         console.error(err); 
       })

      //  axios.get("http://127.0.0.1:8090/findparamsubjectXl").then(res => {

      //   this.arraytotree(res.data);
        
      //   }).catch(res => {

      //   })
      //   axios.get("http://127.0.0.1:8090/findparamlanguageXl").then(res => {

      //   this.arraytotree2(res.data);

      //   }).catch(res => {

      //   })
      },
      selsChange(sels) {      
        //被选中的行组成数组 
        this.sels = sels;
        // alert(JSON.stringify(this.sels))
        //遍历被选中行数所组成的数组
        for(let element of this.sels){
        //如果视频正在转码或者等待转码,禁用按钮,结束方法
          if(element.status == 'waiting'||element.progress){
            this.disabled = true;
            return;
          }
             //如果没有视频正在转码或者等待转码,按钮可用
            this.disabled = false;
        }
    },
    removeBatch(rows){  //批量删除
      var ids = [];
      //alert(JSON.stringify(rows))
      rows.forEach(element =>{
        ids.push(element.id)
      })
      alert(ids)
      this.$confirm('确定要删除选中的文件吗?','提示').then(() =>{
        axios.get("http://29n01o8660.oicp.vip/server/coversbulkdel/"+ids)
        .then(res => {
          this.loading = true;
        setTimeout(() => {
          this.loading = false;

          this.$message({
          message: '恭喜你，批量删除成功',
          type: 'success'
           });

          }, 2000);

          this.getlist(1);
          console.log(res)
        })
        .catch(err => {
          console.error(err); 
        })
      }).catch(()=>{});
    },
    unit(id){
      this.aa.length=0;
      this.bb.length = 0
     
      axios.get("http://29n01o8660.oicp.vip/server/coverOrderFindId/"+id)
      .then(res => {
        this.orders = res.data
        console.log(res)
      })
      .catch(err => {
        console.error(err); 
      })
      axios.get("http://29n01o8660.oicp.vip/server/coverFindId/"+id)
      .then(res => {
        this.subjectId();
        	this.covers = res.data;
          var arr = res.data.subjectId.split(',');
          for(var i = 0; i < arr.length; i++) {
            var myArray=new Array()
              myArray[i]=arr[i]
              var r = myArray.filter(function (s) {
                return s && s.trim(); // 注：IE9(不包含IE9)以下的版本没有trim()方法
            });
              this.aa.push(r)
              this.covers.subjectId = this.aa
              
              // alert(JSON.stringify(this.covers.subjectId))
						}
            var arr = res.data.languageId.split(',');
          for(var i = 0; i < arr.length; i++) {
            var myArray=new Array()
              myArray[i]=arr[i]
              var r = myArray.filter(function (s) {
                return s && s.trim(); // 注：IE9(不包含IE9)以下的版本没有trim()方法
            });
            // this.bb.length = 0
              this.bb.push(r)
              this.covers.languageId = this.bb
             
              // alert(JSON.stringify(this.covers.subjectId))
						}
           
        console.log(res)
      })
      .catch(err => {
        console.error(err); 
      })
      axios.get("http://29n01o8660.oicp.vip/server/selectBycoverId/"+id)
      .then(res => {
        this.ordero = res.data
        console.log(res)
      })
      .catch(err => {
        console.error(err); 
      })
      
    },
    

    coverupdate(){

       
          let s = []
          let l = []
						for(var i = 0; i < this.covers.subjectId.length; i++) {
							s.push(this.covers.subjectId[i])
						}
            alert(JSON.stringify(this.covers))
            for(var i = 0; i < this.covers.languageId.length; i++) {
							l.push(this.covers.languageId[i])
						}
            this.covers.subjectId = s.join()
            this.covers.languageId = l.join()

         this.coversubup = Object.assign({}, this.covers)
        //  alert(JSON.stringify(this.coversubup))
      axios.post("http://29n01o8660.oicp.vip/server/addCoverSnapshot",this.coversubup)
      .then(res => {
        console.log(res)
      })
      .catch(err => {
        console.error(err); 
      })

      this.$confirm('确定要修改套信息吗?','提示').then(() =>{
        axios.post("http://29n01o8660.oicp.vip/server/coverOrderupdate",this.orders)
      .then(res => {
        this.loading = true;
        setTimeout(() => {
          this.loading = false;
          this.$message({
          message: '恭喜你，套信息修改成功',
          type: 'success'
          });

        }, 2000);
        
        this.getlist(1)
        console.log(res)
      })
      .catch(err => {
        console.error(err); 
      })
      }).catch(()=>{});


      
    },
    coveradd(){
          let s = []
          let l = []
						for(var i = 0; i < this.cover.subjectId.length; i++) {
							s.push(this.cover.subjectId[i])
						}
            alert(JSON.stringify(this.cover))
            for(var i = 0; i < this.cover.languageId.length; i++) {
							l.push(this.cover.languageId[i])
						}
            this.cover.subjectId = s.join()
            this.cover.languageId = l.join()

         this.coversub = Object.assign({}, this.cover)

        // alert(JSON.stringify(this.params))

      axios.post("http://29n01o8660.oicp.vip/server/coveradd",this.coversub)
      .then(res => {
    
        console.log(res)
      })
      .catch(err => {
        console.error(err); 
      })
      
      this.$confirm('确定要添加套信息吗?','提示').then(() =>{
        axios.post("http://29n01o8660.oicp.vip/server/coverOrderadd/",this.order)
      .then(res => {
        this.loading = true;
        setTimeout(() => {
          this.loading = false;
          this.$message({
          message: '恭喜你，套信息添加成功',
          type: 'success'
          });
        }, 2000);
        this.getlist(1)
        console.log(res)
      })
      .catch(err => {
        console.error(err); 
      })
      }).catch(()=>{});
      
    },
    click(){
      this.order = {}
      this.cover = {}
    },
    audit(rows){  //批量提交
      var ids = [];
      //alert(JSON.stringify(rows))
      rows.forEach(element =>{
        ids.push(element.id)
      })
      alert(ids)
      this.$confirm('确定要提交选中的文件吗?','提示').then(() =>{
        axios.get("http://29n01o8660.oicp.vip/server/coversbulkaudit/"+ids)
        .then(res => {
          this.loading = true;
        setTimeout(() => {
          this.loading = false;

          this.$message({
          message: '恭喜你，批量提交成功',
          type: 'success'
           });

          }, 2000);

          this.getlist(1);
          console.log(res)
        })
        .catch(err => {
          console.error(err); 
        })
      }).catch(()=>{});
    },
    checkboxT(row, rowIndex){
      // alert(JSON.stringify(row.reviewType))
        if(row.reviewType==0){
          return true;//不禁用
        }else{
          return false;//禁用
        }
      },

      handleNodeClick(data) {
                this.param = data;
                // window.localStorage.setItem("id",this.param.id);
                // console.log(data);
              },
              //数组转化为树
              arraytotree(arr) {
                console.log(arr)
               
                  var top = [], sub = [], tempObj = {};
                  
                  arr.forEach(function (item) {
                   
                      if (item.pId=="8a808bf264a102ba0164a10ac1fc0007") { // 顶级分类
                          top.push(item)
                          
                      } else {
                          sub.push(item) // 其他分类
                      }
                      item.children = []; // 默然添加children属性
                  //     if(parent.children.length<1){
                  //          parent.children = undefined;
                  // }
                       tempObj[item.id] = item // 用当前分类的id做key，存储在tempObj中
                     
                  })
  
                  sub.forEach(function (item) {
                    //判断children是否为空
                      if(item.children.length<1){

                        item.children = undefined;

                      }
                      // 取父级
                      var parent = tempObj[item.pId] || {'children': []}
                      
                        parent.children.push(item)
                     
                      // alert(JSON.stringify(parent))
                      // 把当前分类加入到父级的children中
                     
                      
                  }) 
                  
                  //  alert(JSON.stringify(top))
                  this.data = top;
                  console.log(top);
                  return top
                 
              },
               //数组转化为树
               arraytotree2(arr) {
                console.log(arr)
               
                  var top = [], sub = [], tempObj = {};
                  
                  arr.forEach(function (item) {
                   
                      if (item.pId=="8b808bfb64bsa28a0164dsae0bb10003") { // 顶级分类
                          top.push(item)
                          
                      } else {
                          sub.push(item) // 其他分类
                      }
                      item.children = undefined; // 默然添加children属性
                  //     if(parent.children.length<1){
                  //          parent.children = undefined;
                  // }
                       tempObj[item.id] = item // 用当前分类的id做key，存储在tempObj中
                     
                  })
  
                  sub.forEach(function (item) {
                    
                      // 取父级
                      var parent = tempObj[item.pId] || {'children': []}
                      
                        parent.children.push(item)
                     
                      // alert(JSON.stringify(parent))
                      // 把当前分类加入到父级的children中
                     
                      
                  }) 
                  
                  //  alert(JSON.stringify(top))
                  this.data2 = top;
                  console.log(top);
                  return top
                 
              },
    }
  })
</script>
</html>